package com.sahala.redis.st;

import java.util.Date;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.sahala.redis.service.RedisService;

public class TestClient {
	static ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
			"spring-all.xml");

	public static void main(String[] args) {
		
		RedisService redisService = (RedisService) context
				.getBean("redisService");
		long userId = 123536L;
		Date now = new Date();
		System.out.println(now);
		System.out.println("begin:"+System.currentTimeMillis());
		for(int i=0;i<200;i++){
			userId++;
			//UserDO userDO = new UserDO(userId,"currentTimeMillis");
			redisService.set(0,userId, "currentTimeMillis");
		}
		System.out.println("end:"+System.currentTimeMillis());
		
		/*UserDO user = redisService.get(userId);
		System.out.println(user.getId());
		System.out.println(user.getName());
		System.out.println(user.getPassword());
		System.out.println(user.getRegDate());
		 
		redisService.type(userId);*/
		
	}
}
